Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luminous: rbd: librbd: object map improperly flagged as invalidated #24415

Merged
merged 5 commits into from Oct 5, 2018

Conversation

dillaman
Copy link

@dillaman dillaman commented Oct 3, 2018

Jason Dillaman added 2 commits October 3, 2018 17:39
The HEAD and snapshots have potentially different flag states
since object maps get invalidated per revision.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 8620827)

Conflicts:
	src/librbd/ObjectMap.cc: trivial resolution
	src/librbd/operation/SnapshotRemoveRequest.cc: trivial resolution
	src/test/librbd/test_DeepCopy.cc: DNE
	src/test/librbd/test_Migration.cc: DNE
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 5877018)

Conflicts:
	src/librbd/object_map/SnapshotRemoveRequest.cc: trivial resolution
	src/librbd/object_map/SnapshotRemoveRequest.h: trivial resolution
@dillaman dillaman added this to the luminous milestone Oct 3, 2018
int r = m_image_ctx.get_flags(m_snap_id, &flags);
assert(r == 0);
int r = m_image_ctx.get_flags(m_snap_id, &m_flags);
ceph_assert(r == 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ceph_assert or assert?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trociny updated

Jason Dillaman added 3 commits October 4, 2018 08:05
…istent snapshot

If duplicate snapshot remove requests are received by the lock owner from a peer
client, the first request will remove the object map. If the second request
arrives while the first is in-progress, it will again attempt to remove the
object map but fail to load it since it's already been deleted. This incorrectly
results in the next object map being flagged as invalid.

Fixes: http://tracker.ceph.com/issues/24516
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 0a31c55)

Conflicts:
	src/librbd/object_map/SnapshotRemoveRequest.cc: trivial resolution
The copyup state machine needs to iterate over all object maps to update
the existence for the object. If an snapshot is being removed concurrently,
it's possible to invalidate the object map for the image.

Fixes: http://tracker.ceph.com/issues/24516
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 5a1cb46)

Conflicts:
	src/librbd/ObjectMap.cc: trivial resolution
	src/librbd/ObjectMap.h: trivial resolution
	src/librbd/deep_copy/ObjectCopyRequest.cc: moved to rbd-mirror image sync
	src/librbd/io/CopyupRequest.cc: trivial resolution
	src/test/librbd/deep_copy/test_mock_ObjectCopyRequest.cc: moved to rbd-mirror image sync
	src/test/librbd/test_mock_ObjectMap.cc: trivial resolution
The IO was being unblocked before object map was created, allowing
a potential copyup request to fail to update a still-to-be-created
object map.

Fixes: http://tracker.ceph.com/issues/24516
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 1e87440)

Conflicts:
	src/librbd/object_map/SnapshotCreateRequest.cc: trivial resolution
	src/librbd/operation/SnapshotCreateRequest.cc: trivial resolution
Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yuriw
Copy link
Contributor

yuriw commented Oct 4, 2018

@yuriw yuriw merged commit 6f8ac15 into ceph:luminous Oct 5, 2018
@dillaman dillaman deleted the wip-36224-luminous branch October 5, 2018 20:23
@smithfarm smithfarm changed the title luminous: librbd: object map improperly flagged as invalidated luminous: rbd: librbd: object map improperly flagged as invalidated Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants